// with polyfills
import 'core-js/stable'
import 'regenerator-runtime/runtime'

import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store/'
import i18n from './locales'
import { VueAxios } from './utils/request'
import ProLayout, { PageHeaderWrapper } from '@ant-design-vue/pro-layout'
import themePluginConfig from '../config/themePluginConfig'
import { Tree, Transfer, Cascader, TreeSelect, FormModel } from 'ant-design-vue'
// mock
// WARNING: `mockjs` NOT SUPPORT `IE` PLEASE DO NOT USE IN `production` ENV.
// import './mock'

import bootstrap from './core/bootstrap'
import './core/lazy_use' // use lazy load components
import './permission' // permission control
import './utils/filter' // global filter
import './global.less' // global style
import './assets/css/base.css'

//打印插件
import Print from 'vue-print-nb'
// import Print from 'print-js'
Vue.use(Print); //注册

// import SIdentify from './components/Identify' //注意引入路径
// Vue.use(SIdentify)

import 'viewerjs/dist/viewer.css'
import Viewer from 'v-viewer'
Vue.use(Viewer)

import {appState,findState} from './store/stateTable'//引用项目状态表文件
Vue.prototype.appState = appState//挂载项目状态表到Vue实例上面
Vue.prototype.findState = findState//挂载查找项目状态方法到Vue实例上面,用法findState(code,value,statefield)

Vue.config.productionTip = false

// mount axios to `Vue.$http` and `this.$http`
import { Empty } from 'ant-design-vue'
Vue.use(Empty)
Vue.use(FormModel)
Vue.use(VueAxios)
Vue.use(Tree)
Vue.use(Cascader)
Vue.use(Transfer)
Vue.use(TreeSelect)
    // use pro-layout components
Vue.component('pro-layout', ProLayout)
Vue.component('page-container', PageHeaderWrapper)
Vue.component('page-header-wrapper', PageHeaderWrapper)

window.umi_plugin_ant_themeVar = themePluginConfig.theme

new Vue({
    router,
    store,
    i18n,
    // init localstorage, vuex
    created: bootstrap,
    render: h => h(App)
}).$mount('#app')